# 第一题
class MyMath:
    '''
    用类封装一个`MyMath`类, 实现加, 减, 乘, 除, 幂, 开方
    :return:
    '''
    def add(self,a ,b):
        '''
        加法运算
        '''
        return a + b
    def sub(self, a , b):
        '''
        减法运算
        '''
        return a - b
    def mul(self, a, b,):
        '''
        乘法运算
        '''
        return a * b
    def div(self, a, b):
        '''
        除法运算
        '''
        return a / b
    def power(self, a, n):
        '''
        幂运算
        '''
        return float(a ** n)
    def sqrt(self, a):
        '''
        开方运算
        '''
        return float(a ** (1/2))

a = MyMath()
b = a.power(2, 13)
print(b)
# 第二题
class Person(object):
    def __init__(self,name, sex):
        '''
        人类
        :param name:名字
        :param sex:性别
        '''
        self.name = name
        self.sex = sex
    def speak(self):
        print(f"我的名字叫{self.name}，我是一个可爱的{self.sex}生？")
    def play(self, game):
        print(f"我{self.name}要玩{game}游戏？？")
class Student(Person):
    def study(self):
        print(f"我们要向学霸{self.name}同学学习！！！")

Salary = Person("Salary","女")
Salary.speak()
Salary.play("英雄联盟")
XiaoMing = Student("小明","男")
XiaoMing.speak()
XiaoMing.study()
XiaoMing.play("王者农药")